var connector = require("../../../src/runtime/jaba");

(function($service$){
var $input$ = {};

/* Init code */

/* Remote code */
var $script$ = 'for customer in root.Customers do (for order in customer.Orders do (var total = ((order.OrderDetails.UnitPrice * order.OrderDetails.Quantity)); if ((total < 500)) then (g0:customer.CustomerID; g1:order.OrderID; g2:total) end; ) end; ) end; ';
var $batch$ = $service$.execute($script$, $input$, function($result$) {

/* Local code */
$result$.getIteration("customer").forEach(function(customer){
customer.getIteration("order").forEach(function(order){
{
console.log(((((("Customer=" + order.getString("g0")) + " Order=") + order.getString("g1")) + " Total=") + order.getString("g2")));
};
});
});

});
})(connector);